#ifndef _SOUND_H_
#define _SOUND_H_

#include <sys/socket.h>
#include <netinet/in.h>

/*数据包包头*/
typedef struct tag_talkdata_header
{
    struct in_addr from_addr; //主叫方ip地址
    struct in_addr to_addr; //接收端ip地址
    unsigned char acodec_type;//音频编解码器类型
    unsigned int timestamp;  //时间戳
    unsigned short DataType;          //数据类型
    unsigned short Frameno;           //帧序号
    unsigned int Framesize;            //帧数据长度    
    unsigned short TotalPackage;      //总包数
    unsigned short CurrPackage;       //当前包数
    unsigned short Datalen;           //数据长度
    unsigned short PackLen;       //数据包大小
}__attribute__ ((packed)) talkdata_header_t;


#define BUFFER_SIZE 10*24000/1000*2  //10ms 24000HZ 两字节

typedef struct tagTalkdata_t talkdata_t;

struct tagTalkdata_t
{
    talkdata_header_t header;//包头
    talkdata_t *pNext, *pPrior;
    unsigned char buffer[BUFFER_SIZE];
};

#endif
